package com.ykht.proj.coupon.Enum;

public enum WeightTypeEnum {
	time("time","createTime","时间"),
	real_read("real_read","readNum","真量阅读");

	private String value;
	private String field;
	private String desc;

	WeightTypeEnum(String value,String field, String desc) {
		this.value = value;
		this.field = field;
		this.desc = desc;
	}


	public static WeightTypeEnum getThisByVal(String val) {
		WeightTypeEnum[] values = WeightTypeEnum.values();
		for (WeightTypeEnum oe : values) {
			if (oe.getValue().equals(val)) {
				return oe;
			}
		}
		return null;
	}
	public static String getDescByVal(String val) {
		WeightTypeEnum[] values = WeightTypeEnum.values();
		for (WeightTypeEnum oe : values) {
			if (oe.getValue().equals(val)) {
				return oe.getDesc();
			}
		}
		return null;
	}
	public static String getFieldByVal(String val) {
		WeightTypeEnum[] values = WeightTypeEnum.values();
		for (WeightTypeEnum oe : values) {
			if (oe.getValue().equals(val)) {
				return oe.getField();
			}
		}
		return null;
	}


	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getField() {
		return field;
	}

	public void setField(String field) {
		this.field = field;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
